<template>
	<div>
		<van-row>
		  <van-col span="3"><router-link to="/guahao"><van-icon name="arrow-left" size="30"/> </router-link> </van-col>
		  
		  <van-col span="18"></van-col>
		  
		  <van-col span="3"><router-link to="/m2"><van-icon name="share-o" size="30"/> </router-link></van-col>
		</van-row>
		
		<van-row>
			<van-col span="24">
				<van-search
				  v-model="value"
				  shape="round"
				  background="#white"
				  placeholder="搜索医院、医生、科室、疾病和症状"
				/>
			</van-col>
		</van-row>
		
		<div style="margin-top: 0.9375rem;">
			<div style="margin-top: 0.625rem;"></div>
			
			<div style="margin-top: 0.625rem;"></div>
			
			
			<van-row v-for="(p,index) in hospitals " :key="index">
				<van-col span="2"></van-col>
				<van-col span="4" style="margin-top: 1.25rem;"> 
				<van-image
				  round
				  width="3rem"
				  height="3rem"
				  :src="p.url"
				  @click="tz(p.name)"
				/>
				
				</van-col>
				<van-col span="2"></van-col>
				<van-col span="16"><h4 @click="tz(p.name)">{{p.name}}</h4>
				<h6 @click="tz(p.name)">国家重点科室：{{p.gz}}</h6> 
			    <h6 @click="tz(p.name)">省级重点科室：{{p.sz}}</h6>
				
				</van-col>
			</van-row>
			
		</div>
		
		<div style="margin-top: 3.125rem;">
			<h6 style="color: darkgray;">没有更多了...</h6>
		</div>
		<div style="margin-top: 6.25rem;"></div>
		
		<div style="margin-bottom: 0px;">
		      <van-sticky>
		        <van-tabbar v-model="active" route>
		          <van-tabbar-item replace to="/guahao"  icon="smile-o">首页</van-tabbar-item>
		          <van-tabbar-item icon="manager-o" to="/ghmy">我的</van-tabbar-item>
		        </van-tabbar>
		      </van-sticky>
		</div>
	
	</div>
</template>

<script>
	export default{
		data(){
			return{
				hospitals:[],
				
			}
		},
		created(){
			// var uc={
			// 		kName:this.$route.query,	
			// }
			var ka=this.$route.query;
			console.log(ka);
			
			this.axios.get("rh/query?kName="+ka.kName).then((res) => {
				console.log(res.data)
				if(res.data.code==200){
					this.hospitals=res.data.data;
				}else{
					this.$toast({
						message: "暂无但当前类型医院",
						icon: 'close'
					});
				}
			})
		},methods:{
			tz(name){
				console.log(name);
				
				this.$router.push({path:"/hmesge",query:{"name":name}});
				
			}
		}
		
		
	}
	
	
</script>

<style>
</style>
